<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script>
	var client = function(){
		
		var engine={
			
			//呈现引擎
			ie:0,
			gecko:0,
			webkit:0,
			khtml:0,
			opera:0,
			
			//具体版本号
			ver:null	
		};
		
		var browser={
			//浏览器
			ie:0,
			firefox:0,
			safari:0,
			konq:0,
			opera:0,
			chrome:0,
			
			//具体的版本
			ver:null	
		};
		
		var system = {
			win:false,
			mac:false,
			x11:false,
			
			//移动设备
			iphone:false,
			ipod:false,
			ipad:false,
			ios:false,
			android:false,
			nokiaN:false,
			winMobile:false
			};
		
		
		//在此检测呈现引擎、平台、设备
		return {
			engine: engine,
			browser:browser,
			system:system	
		}
		
	}();
	
	system.iphone=ua.indexOf('iphone')>-1;
	system.ipod=ua.indexOf('ipod')>-1;
	system.ipod=ua.indexOf('ipod')>-1;
	
	//检测ios版本
	if(system.mac && us.indexOf('Mobile') > -1){
		if(/CPU(?:iPhone )?OS (\d+_\d+)/.test(ua)){
			system.ios=parseFloat(RegExp.$1.replace('_','.'));	
		}else{
			system.ios=2;	
		}
	}
	
	//检测Android版本
	if(/Android (\d+\.\d+)/.test(ua)){
		system.android=parseFloat(RegExp.$1);	
	}
	if(client.engin.webkit){
		if(client.system.iOS){
			//iOS手机内容	
		}else if(client.system.android){
			//Android手机内容	
		}else if(client.system.nokiaN){
			//诺基亚手机内容	
		}	
	}
	
	//检测 Windows Mobile
	system.winMobile=(system.win=='CE');
	
	//windows mobile
	if(system.win=='CE'){
		system.winMobile=system.win;	
	}else if(system.win=='Ph'){
		if(/Window Phone OS (\d+.\d+)/.test(ua)){
			system.win='Phone';
			system.winMobile=parseFloat(RegExp['$1']);
		}	
	}
	
</script>
	


</head>

<body>
    <div id="dom">8888888</div>
</body>

</html>
 